<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
if(!defined("PHPEXCEL_ROOT")) {
    define("PHPEXCEL_ROOT", dirname(__FILE__) . "/../../");
    require PHPEXCEL_ROOT . "PHPExcel/Autoloader.php";
}
class PHPExcel_Cell_DefaultValueBinder implements PHPExcel_Cell_IValueBinder
{
    public function bindValue(PHPExcel_Cell $cell, $value = NULL)
    {
        if(is_string($value)) {
            $value = PHPExcel_Shared_String::SanitizeUTF8($value);
        } elseif(is_object($value)) {
            if($value instanceof DateTime) {
                $value = $value->format("Y-m-d H:i:s");
            } elseif(!$value instanceof PHPExcel_RichText) {
                $value = (string) $value;
            }
        }
        $cell->setValueExplicit($value, self::dataTypeForValue($value));
        return true;
    }
    public static function dataTypeForValue($pValue = NULL)
    {
        if($pValue === NULL) {
            return PHPExcel_Cell_DataType::TYPE_NULL;
        }
        if($pValue === "") {
            return PHPExcel_Cell_DataType::TYPE_STRING;
        }
        if($pValue instanceof PHPExcel_RichText) {
            return PHPExcel_Cell_DataType::TYPE_INLINE;
        }
        if($pValue[0] === "=" && 1 < strlen($pValue)) {
            return PHPExcel_Cell_DataType::TYPE_FORMULA;
        }
        if(is_bool($pValue)) {
            return PHPExcel_Cell_DataType::TYPE_BOOL;
        }
        if(is_float($pValue) || is_int($pValue)) {
            return PHPExcel_Cell_DataType::TYPE_NUMERIC;
        }
        if(preg_match("/^[\\+\\-]?([0-9]+\\.?[0-9]*|[0-9]*\\.?[0-9]+)([Ee][\\-\\+]?[0-2]?\\d{1,3})?\$/", $pValue)) {
            $tValue = ltrim($pValue, "+-");
            if(is_string($pValue) && $tValue[0] === "0" && 1 < strlen($tValue) && $tValue[1] !== ".") {
                return PHPExcel_Cell_DataType::TYPE_STRING;
            }
            if(strpos($pValue, ".") === false && PHP_INT_MAX < $pValue) {
                return PHPExcel_Cell_DataType::TYPE_STRING;
            }
            return PHPExcel_Cell_DataType::TYPE_NUMERIC;
        }
        if(is_string($pValue) && array_key_exists($pValue, PHPExcel_Cell_DataType::getErrorCodes())) {
            return PHPExcel_Cell_DataType::TYPE_ERROR;
        }
        return PHPExcel_Cell_DataType::TYPE_STRING;
    }
}

?>